package cn.tedu.spring.eg2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestMapper {
    public static void main(String[] args) {
        ApplicationContext context=
                new AnnotationConfigApplicationContext("cn.tedu.spring.eg2");

//        getBean 必须要调用的是Controller层的对象
        CommentMapper mapper = context.getBean(CommentMapper.class);

        System.out.println("mapper = " + mapper);
    }
}
